package com.avengers.core.kit;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.Closeable;

/**
 * @author yu.wang
 * @since 2025/7/1 14:12
 **/
public class IOKit {
    private static final Logger logger = LoggerFactory.getLogger(IOKit.class);

    public static void close(Closeable closeable) {
        close(logger, closeable);
    }

    public static void close(Logger logger, Closeable closeable) {
        try {
            if (null != closeable) {
                closeable.close();
            }
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
    }
}
